$(function(){
	//添加操作备注
	var $btnSave = $('#btnSave');
	
	$btnSave.click(function(){
		costUpdate();
	});
	
});

//保存修改
function costUpdate(){
	
	var order_id 		= $('#order_id').val();
	var shipping_fee	= $.trim($('#shipping_fee').val());
	var pack_fee 		= $.trim($('#pack_fee').val());
	var discount 		= $.trim($('#discount').val());
	var paid_amount		= $.trim($('#paid_amount').val());

	var params = {
		'order_id'			:order_id,
		'shipping_fee'		:shipping_fee,
		'pack_fee'			:pack_fee,
		'discount'			:discount,
		'paid_amount'		:paid_amount
	};
	$.post('/index.php/Admin/Order/cost_update_do',params,function(data){
		
		if(data.success){
			alert('费用保存成功');
			location.href = '/index.php/Admin/Order/detail?id=' + order_id;
		}else{
			alert('费用保存失败');
		}
		
	},'json');
}